package start;

import org.springframework.context.ApplicationContext;
import org.springframework.context.MessageSource;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import pack_4_14_2.MyApplicationEventPublisherAware;

public class Main {
    public static void main(String[] args) {
        //4.14.1 Internationalization using MessageSource
        //MessageSource resources = new ClassPathXmlApplicationContext("META-INF\\beans.xml");
        //String message = resources.getMessage("message", null, "Default", null);
        //System.out.println(message);
        
        //ApplicationContext context = new ClassPathXmlApplicationContext("META-INF\\beans.xml");
        //Example example = (Example) context.getBean("exampleBean");
        //example.execute();
        
        //4.14.2 Standard and Custom Events
        //System.out.println("Main.main()");
        //ApplicationContext context = new ClassPathXmlApplicationContext("META-INF\\beans1.xml");
        //MyApplicationEventPublisherAware publisher = (MyApplicationEventPublisherAware) context.getBean("myApplicationEventPublisherAware");        
        //publisher.sendEmail("Romanov", "HELLO!");
        
        //4.14.3 Convenient access to low-level resources
        ApplicationContext context = new ClassPathXmlApplicationContext("META-INF\\beans2.xml");
    }
}
